/**
 * Copyright 2016 JustWayward Team
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.ecy.quadratic.api;

import com.ecy.quadratic.beans.BaseResponseBean;
import com.ecy.quadratic.beans.ComicDetailResponseBean;
import com.ecy.quadratic.beans.ComicRecommendResponseBean;
import com.ecy.quadratic.beans.ComicResponseBean;
import com.ecy.quadratic.beans.ComicSectionDetailResponseBean;
import com.ecy.quadratic.beans.CommunityCommentListResponseBean;
import com.ecy.quadratic.beans.CommunityListResponseBean;
import com.ecy.quadratic.beans.NovelResponseBean;
import com.ecy.quadratic.beans.VideoResponseBean;

import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;
import rx.Observable;

/**
 * https://github.com/JustWayward/BookReader
 *
 * @author yuyh.
 * @date 2016/8/3.
 */
public interface ComicApiService {

    @GET("comicrecommend.json")
    Observable<ComicRecommendResponseBean> getComicRecommend(@Query("page") String page);

    @GET("novel.json")
    Observable<NovelResponseBean> getNovelRecommend(@Query("page") String page);

    @GET("comic.json")
    Observable<ComicResponseBean> getComicList(@Query("page") String page, @Query("classify") String classify);

    @GET("lastcommunity")
    Observable<CommunityListResponseBean> getLastCommunityList(@Query("page") String page);

    @GET("hotcommunity")
    Observable<CommunityListResponseBean> getHotCommunityList(@Query("page") String page);

    @GET("communitycommentlist")
    Observable<CommunityCommentListResponseBean> getCommunityCommentList(@Query("communityId") String communityId, @Query("page") String page);

    @GET("postcommunitycomment")
    Observable<BaseResponseBean> postCommunityComment(@Query("communityId") String communityId, @Query("userid") String userid, @Query("user") String user, @Query("content") String content);


    @GET("comiccommentlist")
    Observable<CommunityCommentListResponseBean> getComicCommentList(@Query("comicId") String communityId, @Query("page") String page);

    @GET("postcomiccomment")
    Observable<BaseResponseBean> postComicComment(@Query("comicId") String communityId, @Query("userid") String userid, @Query("user") String user, @Query("content") String content);

    @GET("bookcommentlist")
    Observable<CommunityCommentListResponseBean> getBookCommentList(@Query("bookId") String communityId, @Query("page") String page);

    @GET("postbookcomment")
    Observable<BaseResponseBean> postBookComment(@Query("bookId") String communityId, @Query("userid") String userid, @Query("user") String user, @Query("content") String content);

    @GET("postlike")
    Observable<BaseResponseBean> postLike(@Query("communityId") String communityId, @Query("userid") String userid, @Query("user") String user, @Query("content") String content);

    @GET("comicdetail.json")
    Observable<ComicDetailResponseBean> getComicDetail(@Query("id") String id);

    @GET("video")
    Observable<VideoResponseBean> getVideoList(@Query("page") String page);

    @GET("http://fuciyuanbang.biaoqingdou.com/fuciyuan/v1/pics/{imgId}")
    Observable<ComicSectionDetailResponseBean> getFuComicImgs(@Path(value = "imgId", encoded = true) String imgId, @Query("plat") String plat, @Query("ver") String ver, @Query("uid") String uid
            , @Query("sid") String sid, @Query("channel") String channel, @Query("app") String app, @Query("iscover") String iscover, @Query("loginuid") String loginuid);
}